﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.History
{
    [NHibernateEntity(Table = "ContractHistory")]
    public class ContractHistory : ILegacy
    {
        public ContractHistory() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Name { get; set; }

        [BelongsTo(Column = "ID_Contract")]
        public virtual Contract Contract { get; set; }

        [Property]
        public virtual PaymentFrequency PaymentFrequency { get; set; }

        [Property]
        public virtual DateTime StartDate { get; set; }

        [Property]
        public virtual DateTime EndDate { get; set; }

        [Property]
        public virtual double GrossValue { get; set; }

        [Property]
        public virtual double ExtraPremiumMedical { get; set; }

        [Property]
        public virtual double ExtraPremiumProfessional { get; set; }

        [Property]
        public virtual double ExtraPremiumOther { get; set; }

        [BelongsTo(Column = "ID_Currency")]
        public virtual Currency Currency { get; set; }
            
        [Property]
        public virtual int ID_Motiv { get; set; }


        [BelongsTo(Column = "ID_Owner_Employee")]
        public virtual Employee Owner { get; set; }

        [BelongsTo(Column = "ID_Account")]
        public virtual Account Account { get; set; }

        [Property]
        public virtual string LegacyApplication { get; set; }

        [Property]
        public virtual string LegacyID { get; set; }

        [Property]
        public virtual double InsuredValue { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }
    }
}
